package com.lagou.rpc.consumer.controller;

import com.lagou.rpc.consumer.service.UserServerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author 郑样平
 * @date 2021/6/7  21:26
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserServerImpl userServer;

    @GetMapping(value = "get/{id}")
    public Object getUser(@PathVariable Integer id){
       return userServer.getById(id);
    }

}
